package knapsack;


public class Pack {
	private int volume;
	private int value;
	private float valueDensity;
	public Pack(int weight, int value) {
		this.volume = weight;
		this.value = value;
		valueDensity = (float)value/volume;
	}
	public int getVolume() {
		return volume;
	}
	public int getValue() {
		return value;
	}
	public float getValueDensity(){
		return valueDensity;
	}
	public void setVolume(int volume) {
		this.volume = volume;
	}
	
	public String toString(){
		return "Volume: " + volume + " Value: " + value;
	}

}
